﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;

namespace OpenAdmin.HttpApi;

/// <summary>
/// 可以继承重写方法实现自定义的返回结果
/// </summary>
public class TestActionResultProvider : DefaultActionResultProvider
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="context"></param>
    /// <param name="data"></param>
    /// <returns></returns>
    public override IActionResult GetSucceededResult(ActionExecutedContext context, object data)
    {
        return base.GetSucceededResult(context, data);
        //return new JsonResult(new
        //{
        //    Result = data
        //});
    }
}
